GError **error)
{
gboolean ret = FALSE;
- gs_unref_ptrarray GPtrArray *components = NULL;
GMatchInfo *match = NULL;
static gsize regex_initialized;
guchar dummy[4];
gsize bytes_read;
gs_unref_object GInputStream *ret_input = NULL;
- gs_unref_object GFileInfo *content_file_info = NULL;
gs_unref_object GFileInfo *ret_file_info = NULL;
gs_unref_variant GVariant *ret_xattrs = NULL;
gs_unref_variant GVariant *file_header = NULL;
GError *temp_error = NULL;
int i = 0;
gs_unref_object GFile *possible_file = NULL;
- gs_free guchar *ret_csum = NULL;
/* 128 attempts seems reasonable... */
for (i = 0; i < 128; i++)
{
gboolean ret = FALSE;
gboolean ret_was_supported = FALSE;
- gs_unref_object GFile *dir = NULL;
again:
if (dirfd != -1 &&
GError **error)
{
gboolean ret = FALSE;
- gs_unref_object GFileInfo *file_info = NULL;
gs_unref_variant GVariant *xattrs = NULL;
gs_unref_object GFileEnumerator *dir_enum = NULL;
gs_unref_object GFileInfo *ret_info = NULL;
gs_unref_variant GVariant *files_variant = NULL;
gs_unref_variant GVariant *dirs_variant = NULL;
- gs_unref_variant GVariant *tree_child_metadata = NULL;
gs_unref_variant GVariant *content_csum_v = NULL;
gs_unref_variant GVariant *meta_csum_v = NULL;
char tmp_checksum[65];
gboolean ret = FALSE;
OstreeRepoFile *self = OSTREE_REPO_FILE (file);
const char *checksum;
- gs_unref_object GFile *local_file = NULL;
gs_unref_object GInputStream *ret_stream = NULL;
if (!ostree_repo_file_ensure_resolved (self, error))
gpointer key, value;
gs_unref_hashtable GHashTable *objects = NULL;
gs_unref_hashtable GHashTable *all_refs = NULL;
- gs_free char *formatted_freed_size = NULL;
OtPruneData data = { 0, };
gboolean refs_only = flags & OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY;
uri_fetch_update_status (gpointer user_data)
{
OtPullData *pull_data = user_data;
- gs_free char *fetcher_status = NULL;
GString *status;
guint outstanding_stages;
guint outstanding_fetches;
{
gboolean ret = FALSE;
gsize len;
- gs_unref_object GFile *tmpf = NULL;
gs_free char *ret_contents = NULL;
- gs_unref_object SoupRequest *request = NULL;
OstreeFetchUriSyncData fetch_data = { 0, };
if (g_cancellable_set_error_if_cancelled (cancellable, error))
gs_unref_variant GVariant *tree = NULL;
gs_unref_variant GVariant *files_variant = NULL;
gs_unref_variant GVariant *dirs_variant = NULL;
- gs_unref_object GFile *stored_path = NULL;
if (recursion_depth > OSTREE_MAX_RECURSION)
{
const char *dirname;
gs_unref_variant GVariant *tree_csum = NULL;
gs_unref_variant GVariant *meta_csum = NULL;
- gs_free char *tmp_checksum = NULL;
g_variant_get_child (dirs_variant, i, "(&s@ay@ay)",
&dirname, &tree_csum, &meta_csum);
GError **error = &local_error;
GCancellable *cancellable = NULL;
guint64 length;
- gs_unref_variant GVariant *file_meta = NULL;
gs_unref_object GFileInfo *file_info = NULL;
- gs_unref_object GInputStream *content_input = NULL;
- gs_unref_object GInputStream *file_object_input = NULL;
gs_unref_variant GVariant *xattrs = NULL;
gs_unref_object GInputStream *file_in = NULL;
gs_unref_object GInputStream *object_input = NULL;
{
gboolean ret = FALSE;
gs_unref_variant GVariant *commit = NULL;
- gs_unref_variant GVariant *related_objects = NULL;
gs_unref_variant GVariant *tree_contents_csum = NULL;
gs_unref_variant GVariant *tree_meta_csum = NULL;
- gs_free char *tmp_checksum = NULL;
GVariantIter *iter = NULL;
if (recursion_depth > OSTREE_MAX_RECURSION)
gboolean tls_permissive = FALSE;
OstreeFetcherConfigFlags fetcher_flags = 0;
gs_free char *remote_key = NULL;
- gs_free char *remote_config_content = NULL;
gs_free char *path = NULL;
gs_free char *baseurl = NULL;
gs_free char *summary_data = NULL;
gs_unref_hashtable GHashTable *requested_refs_to_fetch = NULL;
gs_unref_hashtable GHashTable *updated_refs = NULL;
gs_unref_hashtable GHashTable *commits_to_fetch = NULL;
- gs_free char *branch_rev = NULL;
gs_free char *remote_mode_str = NULL;
GSource *queue_src = NULL;
OtPullData pull_data_real = { 0, };
{
const char *ref = key;
const char *sha256 = value;
- gs_free char *key = NULL;
- gs_free char *remote_ref = NULL;
- gs_free char *baseurl = NULL;
ot_waitable_queue_push (pull_data->metadata_objects_to_scan,
pull_worker_message_new (PULL_MSG_SCAN,
gboolean ret = FALSE;
__attribute__((unused)) GCancellable *cancellable = NULL;
GError *temp_error = NULL;
- gs_free char *tmp = NULL;
- gs_free char *tmp2 = NULL;
gs_free char *ret_rev = NULL;
gs_unref_object GFile *child = NULL;
- gs_unref_object GFile *origindir = NULL;
g_return_val_if_fail (ref != NULL, FALSE);
while (TRUE)
{
gboolean recurse = FALSE;
- gs_unref_variant GVariant *parent_csum_bytes = NULL;
gs_unref_variant GVariant *meta_csum_bytes = NULL;
gs_unref_variant GVariant *content_csum_bytes = NULL;
gs_unref_variant GVariant *key = NULL;
const char *actual_checksum;
gboolean do_commit;
OstreeRepoMode repo_mode;
- gs_unref_object GFileInfo *temp_info = NULL;
gs_unref_object GFile *temp_file = NULL;
gs_unref_object GFile *raw_temp_file = NULL;
gs_unref_object GFile *stored_path = NULL;
guint i;
OstreeRepoMode repo_mode;
gs_unref_ptrarray GPtrArray *object_dirs = NULL;
- gs_unref_object GFile *objdir = NULL;
if (self->parent_repo)
{
gboolean ret = FALSE;
guint i;
gs_unref_ptrarray GPtrArray *object_dirs = NULL;
- gs_unref_object GFile *objdir = NULL;
if (!get_loose_object_dirs (self, &object_dirs, cancellable, error))
goto out;
{
gboolean ret = FALSE;
OstreeRepoMode repo_mode;
- gs_unref_variant GVariant *file_data = NULL;
gs_unref_object GFile *loose_path = NULL;
- gs_unref_object GFileInfo *content_loose_info = NULL;
gs_unref_object GInputStream *ret_input = NULL;
gs_unref_object GFileInfo *ret_file_info = NULL;
gs_unref_variant GVariant *ret_xattrs = NULL;
{
GOptionContext *context;
gboolean ret = FALSE;
- gs_free char *booted_osname = NULL;
gs_unref_object GFile *repo_path = NULL;
gs_unref_object OtDeployment *deployment = NULL;
gs_unref_object GFile *deployment_dir = NULL;
- gs_unref_object GFile *deploy_parent = NULL;
gs_unref_ptrarray GPtrArray *modified = NULL;
gs_unref_ptrarray GPtrArray *removed = NULL;
gs_unref_ptrarray GPtrArray *added = NULL;
int deploy_index;
int current_bootversion;
gs_unref_ptrarray GPtrArray *current_deployments = NULL;
- gs_unref_ptrarray GPtrArray *new_deployments = NULL;
- gs_free char *revision = NULL;
gs_unref_object OtDeployment *booted_deployment = NULL;
gs_unref_object OtDeployment *target_deployment = NULL;
{
gboolean ret = FALSE;
GOptionContext *context;
- gs_free char *booted_osname = NULL;
gs_unref_object OstreeRepo *repo = NULL;
gs_unref_object GFile *repo_path = NULL;
gs_free char *origin_refspec = NULL;
gs_unref_ptrarray GPtrArray *current_deployments = NULL;
gs_unref_ptrarray GPtrArray *new_deployments = NULL;
gs_unref_object OtDeployment *new_deployment = NULL;
- gs_free char *ostree_dir_arg = NULL;
int current_bootversion;
int new_bootversion;
GKeyFile *origin;
gboolean ret = FALSE;
gs_unref_object GFileEnumerator *dir_enum = NULL;
gs_unref_object GFile *deploydir = NULL;
- gs_unref_object GFile *osdir = NULL;
gs_unref_ptrarray GPtrArray *ret_deployments = NULL;
GError *temp_error = NULL;
gboolean ret = FALSE;
gs_unref_object GFileEnumerator *dir_enum = NULL;
gs_unref_object GFile *boot_ostree = NULL;
- gs_unref_object GFile *osdir = NULL;
gs_unref_ptrarray GPtrArray *ret_bootdirs = NULL;
GError *temp_error = NULL;
gboolean ret = FALSE;
int cleanup_bootversion;
int cleanup_subbootversion;
- gs_free char *cleanup_boot_name = NULL;
gs_unref_object GFile *cleanup_boot_dir = NULL;
cleanup_bootversion = bootversion == 0 ? 1 : 0;
guint i;
gint n_objects_total, n_objects_pruned;
guint64 freed_space;
- gs_free char *cleanup_boot_name = NULL;
- gs_unref_object GFile *cleanup_boot_dir = NULL;
cleanup_bootversion = (bootversion == 0) ? 1 : 0;
cleanup_subbootversion = (subbootversion == 0) ? 1 : 0;
GError **error)
{
gboolean ret = FALSE;
- gs_unref_object GFile *ostree_etc = NULL;
- gs_unref_object GFile *tmp_etc = NULL;
gs_unref_ptrarray GPtrArray *modified = NULL;
gs_unref_ptrarray GPtrArray *removed = NULL;
gs_unref_ptrarray GPtrArray *added = NULL;
const char *csum = ot_deployment_get_csum (deployment);
gs_unref_object OstreeRepoFile *root = NULL;
gs_unref_object GFileInfo *file_info = NULL;
- gs_unref_object GFileInfo *existing_checkout_info = NULL;
gs_free char *checkout_target_name = NULL;
- gs_free char *checkout_target_tmp_name = NULL;
gs_unref_object GFile *osdeploy_path = NULL;
gs_unref_object GFile *deploy_target_path = NULL;
gs_unref_object GFile *deploy_parent = NULL;
gboolean ret = FALSE;
gs_unref_object GFile *bootdir = g_file_get_child (deployroot, "boot");
gs_unref_object GFileEnumerator *dir_enum = NULL;
- gs_unref_object GFileInfo *file_info = NULL;
gs_unref_object GFile *ret_kernel = NULL;
gs_unref_object GFile *ret_initramfs = NULL;
gs_unref_object GFile *ostree_bootdir = g_file_resolve_relative_path (ostree_dir, ostree_bootdir_name);
gs_free char *ostree_subbootdir_name = NULL;
gs_unref_object GFile *ostree_subbootdir = NULL;
- gs_unref_ptrarray GPtrArray *deployments_to_swap = NULL;
if (!ot_admin_read_current_subbootversion (sysroot, current_bootversion,
&old_subbootversion,
gboolean ret = FALSE;
OtDeployment *new_deployment;
gs_unref_object OtDeployment *merge_deployment = NULL;
- gs_unref_object GFile *rootfs = NULL;
gs_unref_object OstreeRepo *repo = NULL;
gs_unref_object GFile *commit_root = NULL;
gs_unref_object GFile *tree_kernel_path = NULL;
gs_unref_object GFile *tree_initramfs_path = NULL;
gs_unref_object GFile *new_deployment_path = NULL;
- gs_unref_object GFile *deploy_path = NULL;
- gs_unref_object GFile *osdir = NULL;
gs_free char *new_bootcsum = NULL;
- gs_unref_object GFile *source_etc_path = NULL;
- gs_unref_object GFile *source_etc_pristine_path = NULL;
gs_unref_object OtConfigParser *bootconfig = NULL;
- gs_free char *source_etc_kernel_args = NULL;
gs_unref_ptrarray GPtrArray *new_deployments = NULL;
int new_bootversion;
gs_unref_object GFile *ostree_dir = g_file_get_child (sysroot, "ostree");
gs_free char *ostree_bootdir_name = g_strdup_printf ("boot.%d", bootversion);
gs_unref_object GFile *ostree_bootdir = g_file_resolve_relative_path (ostree_dir, ostree_bootdir_name);
- gs_free char *ostree_subbootdir_name = NULL;
gs_unref_object GFile *ostree_subbootdir = NULL;
- gs_unref_ptrarray GPtrArray *deployments_to_swap = NULL;
if (!ot_gfile_query_symlink_target_allow_noent (ostree_bootdir, &ostree_subbootdir,
cancellable, error))
gs_free char *config_contents = NULL;
gs_free char *new_config_contents = NULL;
gs_unref_ptrarray GPtrArray *new_lines = NULL;
- gs_unref_ptrarray GPtrArray *tmp_args = NULL;
/* This should follow the symbolic link to the current bootversion. */
config_contents = gs_file_load_contents_utf8 (self->config_path, cancellable, error);
gboolean ret = FALSE;
const char *commit;
const char *destination;
- gs_free char *existing_commit = NULL;
gs_free char *resolved_commit = NULL;
- gs_free char *tmp_destination = NULL;
- gs_unref_object GFileInfo *symlink_file_info = NULL;
gs_unref_object GFile *checkout_target = NULL;
gs_unref_object GFile *checkout_target_tmp = NULL;
- gs_unref_object GFile *symlink_target = NULL;
context = g_option_context_new ("COMMIT DESTINATION - Check out a commit into a filesystem tree");
g_option_context_add_main_entries (context, options, NULL);
GHashTableIter hash_iter;
gpointer key, value;
gs_unref_hashtable GHashTable *reachable_objects = NULL;
- gs_unref_variant GVariant *metadata = NULL;
- gs_free guchar *computed_csum = NULL;
guint i;
guint mod;
guint count;
const char *rev;
int i;
gs_unref_object GFile *root = NULL;
- gs_unref_object GFile *f = NULL;
- gs_unref_object GFileInfo *file_info = NULL;
context = g_option_context_new ("COMMIT PATH [PATH...] - List file paths");
g_option_context_add_main_entries (context, options, NULL);
GError **error)
{
gboolean ret = FALSE;
- gs_unref_object GFile *content_path = NULL;
- gs_unref_object GFileInfo *archive_info = NULL;
if (objtype == OSTREE_OBJECT_TYPE_FILE)
{
GHashTableIter hash_iter;
gpointer key, value;
gboolean transaction_resuming = FALSE;
- gs_unref_hashtable GHashTable *objects = NULL;
gs_unref_object GFile *src_f = NULL;
gs_unref_object GFile *src_repo_dir = NULL;
gs_unref_object GFile *dest_repo_dir = NULL;
- gs_unref_object GFile *src_dir = NULL;
- gs_unref_object GFile *dest_dir = NULL;
gs_unref_hashtable GHashTable *refs_to_clone = NULL;
gs_unref_hashtable GHashTable *commits_to_clone = NULL;
gs_unref_hashtable GHashTable *source_objects = NULL;
- gs_unref_hashtable GHashTable *objects_to_copy = NULL;
OtLocalCloneData datav = { 0, };
OtLocalCloneData *data = &datav;
const char *rev = "master";
int i;
gs_free char *resolved_rev = NULL;
- gs_unref_variant GVariant *variant = NULL;
- gs_free char *formatted_variant = NULL;
context = g_option_context_new ("REV - Output the target of a rev");
g_option_context_add_main_entries (context, options, NULL);
gboolean found = FALSE;
if (!ostree_validate_checksum_string (rev, NULL))
{
- gs_unref_variant GVariant *variant = NULL;
if (!ostree_repo_resolve_rev (repo, rev, FALSE, &resolved_rev, error))
goto out;
if (!print_object (repo, OSTREE_OBJECT_TYPE_COMMIT, resolved_rev, error))
const char *dirpath;
OtTrivialHttpd appstruct = { 0, };
OtTrivialHttpd *app = &appstruct;
- gs_unref_object GFile *dir = NULL;
gs_unref_object SoupServer *server = NULL;
gs_unref_object GFileMonitor *dirmon = NULL;
{
const char *spc = strchr (line, ' ');
gs_free char *ref = NULL;
- gs_free guchar *rev = NULL;
if (!spc || spc == line)
{
static void
dump_indented_lines (const gchar *data)
{
- const char const* indent = " ";
+ const char* indent = " ";
const gchar *pos;
for (;;)